<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<!--
    3.求[12,34,2,5,76]数组中最大值
-->

<script>

    var arr = [12, 34, 2, 5, 76]

    var max = arr[0]

    for (var i = 0; i < arr.length; i++) {
        if (max < arr[i]) {
            max = arr[i]
        }
    }

    console.log("max = " + max);


</script>
</body>
</html>